package com.yjd.bi.user.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.yjd.comm.base.dao.impl.BaseDaoImpl;
import com.yjd.comm.util.ArithUtil;
import com.yjd.comm.util.DateUtil;
import com.yjd.comm.util.FrameUtil;
import com.yjd.comm.util.NumberUtil;
import com.yjd.bi.report.enums.TimeType;
import com.yjd.bi.report.model.EChartsModel;
import com.yjd.bi.report.util.TimeDimensionUtil;
import com.yjd.bi.user.model.BasicDataAppModel;
import com.yjd.bi.user.dao.IBasicDataAppDao;

/**
 * <b>description</b>：app基础数据数据访问层 <br>
 * <b>time</b>：2016-06-06 15:18:27 <br>
 * <b>author</b>： zhoujin@yijiedai.com
 */
@Component("basicDataAppDao")
public class BasicDataAppDaoImpl extends BaseDaoImpl implements IBasicDataAppDao {

	private static final String SQLMAPNAMESPACE = BasicDataAppModel.class.getName();
	private static final String PKNAME = "id";

	@Override
	public String getPrimaryKeyName() {
		return PKNAME;
	}

	@Override
	public String getSqlmapNamespace() {
		return SQLMAPNAMESPACE;
	}
	
	@Override
	public double getFundsSum(Map<String, Object> paramMap, boolean b) {
		Object myObject = this.getSqlMap(b).queryForObject(this.getStatement("usersSum"),paramMap);
		if (myObject != null) {
			return Double.parseDouble(myObject.toString());
		}
		return 0.00D;
	}
	
}
